from src.common.models.status import ResponseStatus


class StatusCodeEnum:
    """
    状态码枚举类，基于ResponseStatus
    """
    # 成功
    SUCCESS = ResponseStatus.SUCCESS
    
    # 客户端错误
    PARAM_ERROR = ResponseStatus.BAD_REQUEST
    UNAUTHORIZED = ResponseStatus.UNAUTHORIZED
    PERMISSION_DENIED = ResponseStatus.FORBIDDEN
    NOT_FOUND = ResponseStatus.NOT_FOUND
    METHOD_NOT_ALLOWED = ResponseStatus.METHOD_NOT_ALLOWED
    VALIDATION_ERROR = ResponseStatus.VALIDATION_ERROR
    
    # 业务错误
    BUSINESS_ERROR = ResponseStatus.BUSINESS_ERROR
    ADMIN_CANNOT_QUIT_PROJECT = ResponseStatus.ADMIN_CANNOT_QUIT_PROJECT
    CANNOT_QUIT_DEFAULT_PROJECT = ResponseStatus.CANNOT_QUIT_DEFAULT_PROJECT
    
    # 服务器错误
    SYSTEM_ERROR = ResponseStatus.INTERNAL_ERROR
    DATABASE_ERROR = ResponseStatus.DATABASE_ERROR
    REDIS_ERROR = ResponseStatus.REDIS_ERROR
    EXTERNAL_API_ERROR = ResponseStatus.EXTERNAL_API_ERROR